import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import { State } from 'vuex-class'

@Component
export default class GrayScaleMixin extends Vue {
	@State('is_gray_scale') gray!: any
  get grayScaleStyle() {
    return {
      filter: this.isGrayScale ? 'grayscale(100%)' : 'none'
    }
  }

  get isGrayScale() {
    return this.gray // 根据实际需求返回是否需要灰度效果
  }
} 